execute as @n[tag=inputHit,type=interaction,distance=..10] on attacker run tag @s add attacker

execute if data entity @s item.components."minecraft:custom_data".guardTowerData{PowerInputEmpty:false} run function vs:system/game_ctrol/guard_tower/power/empty_input

data remove entity @n[tag=inputHit ,type=interaction,distance=..10] attack
tag @n[tag=inputHit,type=interaction,distance=..10] remove inputHit
tag @p[tag=attacker,distance=..200] remove attacker